<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>获取访问者ip</title>
  </head>
  <body>
    <script>
    //   fetch('https://api.ipify.org?format=json')
      fetch('https://qifu-api.baidubce.com/ip/local/geo/v1/district?')
        .then((response) => response.json())
        .then((data) => {
          console.log(data)
        })
    </script>
  </body>
</html>
